/*
 * @Description: 行程账单原型
 * @Author: tao.xie
 * @Date: 2019-03-29 11:17:40
 * @Last Modified by: tao.xie
 * @Last Modified time: 2019-03-29 16:13:04
 */

export default class RouteBillModel {
  /**
   *Creates an instance of RouteBillModel.
   * @param {Interger} isSupplement 是否是补扣账单,true false
   * @param {Array} tradeBills 行程补扣账单列表,只有在账单类型是行程补扣订单的时候才返回
   * @param {String} title 标题
   * @param {String} payName 支付名称
   * @param {String} bankCardNo 银行卡号后四位
   * @param {Array} posBillNo 行程订单号，用于重新拉起支付
   * @param {String} tradeNo 账单编号
   * @param {String} payFee 实际支付金额
   * @param {Integer} state 交易状态，-2.交易失败,-1.已退款,0.交易成功,1.待支付,2.已补扣
   * @param {String} tradeTime 交易创建时间
   * @param {String} payTime 实际支付时间
   * @param {String} refundReson 退款原因
   * @memberof RouteBillModel
   */
  constructor(
    isSupplement,
    tradeBills,
    title,
    payName,
    bankCardNo,
    posBillNo,
    tradeNo,
    payFee,
    state,
    tradeTime,
    payTime,
    refundReson
  ) {
    this.isSupplement = isSupplement === 1
    this.tradeBills = tradeBills
    this.title = title
    this.payName = payName
    this.bankCardNo = bankCardNo
    this.posBillNo = posBillNo
    this.tradeNo = tradeNo
    this.payFee = parseFloat(payFee).toFixed(2) + ''
    this.state = state
    this.tradeTime = tradeTime
    this.payTime = payTime
    this.refundReson = refundReson
  }
}
